3.391 \(\int \frac{(d+e x^r)^2 (a+b \log (c x^n))}{x^8} \, dx\)

Optimal. Leaf size=127 \[ -\frac{d^2 \left (a+b \log \left (c x^n\right )\right )}{7 x^7}-\frac{2 d e x^{r-7} \left (a+b \log \left (c x^n\right )\right )}{7-r}-\frac{e^2 x^{2 r-7} \left (a+b \log \left (c x^n\right )\right )}{7-2 r}-\frac{b d^2 n}{49 x^7}-\frac{2 b d e n x^{r-7}}{(7-r)^2}-\frac{b e^2 n x^{2 r-7}}{(7-2 r)^2} \]

[Out]

-(b*d^2*n)/(49*x^7) - (2*b*d*e*n*x^(-7 + r))/(7 - r)^2 - (b*e^2*n*x^(-7 + 2*r))/(7 - 2*r)^2 - (d^2*(a + b*Log[
c*x^n]))/(7*x^7) - (2*d*e*x^(-7 + r)*(a + b*Log[c*x^n]))/(7 - r) - (e^2*x^(-7 + 2*r)*(a + b*Log[c*x^n]))/(7 -
2*r)

________________________________________________________________________________________

Rubi [A]  time = 0.177296, antiderivative size = 109, normalized size of antiderivative = 0.86, number of steps used = 4, number of rules used = 4, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.174, Rules used = {270, 2334, 12, 14} \[ -\frac{1}{7} \left (\frac{d^2}{x^7}+\frac{14 d e x^{r-7}}{7-r}+\frac{7 e^2 x^{2 r-7}}{7-2 r}\right ) \left (a+b \log \left (c x^n\right )\right )-\frac{b d^2 n}{49 x^7}-\frac{2 b d e n x^{r-7}}{(7-r)^2}-\frac{b e^2 n x^{2 r-7}}{(7-2 r)^2} \]

Antiderivative was successfully verified.

[In]

Int[((d + e*x^r)^2*(a + b*Log[c*x^n]))/x^8,x]

[Out]

-(b*d^2*n)/(49*x^7) - (2*b*d*e*n*x^(-7 + r))/(7 - r)^2 - (b*e^2*n*x^(-7 + 2*r))/(7 - 2*r)^2 - ((d^2/x^7 + (14*
d*e*x^(-7 + r))/(7 - r) + (7*e^2*x^(-7 + 2*r))/(7 - 2*r))*(a + b*Log[c*x^n]))/7

Rule 270

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*(a + b*x^n)^p,
 x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0]

Rule 2334

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(x_)^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = I
ntHide[x^m*(d + e*x^r)^q, x]}, Simp[u*(a + b*Log[c*x^n]), x] - Dist[b*n, Int[SimplifyIntegrand[u/x, x], x], x]
] /; FreeQ[{a, b, c, d, e, n, r}, x] && IGtQ[q, 0] && IntegerQ[m] &&  !(EqQ[q, 1] && EqQ[m, -1])

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rubi steps

\begin{align*} \int \frac{\left (d+e x^r\right )^2 \left (a+b \log \left (c x^n\right )\right )}{x^8} \, dx &=-\frac{1}{7} \left (\frac{d^2}{x^7}+\frac{14 d e x^{-7+r}}{7-r}+\frac{7 e^2 x^{-7+2 r}}{7-2 r}\right ) \left (a+b \log \left (c x^n\right )\right )-(b n) \int \frac{-d^2+\frac{14 d e x^r}{-7+r}+\frac{7 e^2 x^{2 r}}{-7+2 r}}{7 x^8} \, dx\\ &=-\frac{1}{7} \left (\frac{d^2}{x^7}+\frac{14 d e x^{-7+r}}{7-r}+\frac{7 e^2 x^{-7+2 r}}{7-2 r}\right ) \left (a+b \log \left (c x^n\right )\right )-\frac{1}{7} (b n) \int \frac{-d^2+\frac{14 d e x^r}{-7+r}+\frac{7 e^2 x^{2 r}}{-7+2 r}}{x^8} \, dx\\ &=-\frac{1}{7} \left (\frac{d^2}{x^7}+\frac{14 d e x^{-7+r}}{7-r}+\frac{7 e^2 x^{-7+2 r}}{7-2 r}\right ) \left (a+b \log \left (c x^n\right )\right )-\frac{1}{7} (b n) \int \left (-\frac{d^2}{x^8}+\frac{14 d e x^{-8+r}}{-7+r}+\frac{7 e^2 x^{2 (-4+r)}}{-7+2 r}\right ) \, dx\\ &=-\frac{b d^2 n}{49 x^7}-\frac{2 b d e n x^{-7+r}}{(7-r)^2}-\frac{b e^2 n x^{-7+2 r}}{(7-2 r)^2}-\frac{1}{7} \left (\frac{d^2}{x^7}+\frac{14 d e x^{-7+r}}{7-r}+\frac{7 e^2 x^{-7+2 r}}{7-2 r}\right ) \left (a+b \log \left (c x^n\right )\right )\\ \end{align*}

Mathematica [A]  time = 0.291135, size = 127, normalized size = 1. \[ \frac{a \left (-7 d^2+\frac{98 d e x^r}{r-7}+\frac{49 e^2 x^{2 r}}{2 r-7}\right )+7 b \log \left (c x^n\right ) \left (-d^2+\frac{14 d e x^r}{r-7}+\frac{7 e^2 x^{2 r}}{2 r-7}\right )+b n \left (-d^2-\frac{98 d e x^r}{(r-7)^2}-\frac{49 e^2 x^{2 r}}{(7-2 r)^2}\right )}{49 x^7} \]

Antiderivative was successfully verified.

[In]

Integrate[((d + e*x^r)^2*(a + b*Log[c*x^n]))/x^8,x]

[Out]

(b*n*(-d^2 - (98*d*e*x^r)/(-7 + r)^2 - (49*e^2*x^(2*r))/(7 - 2*r)^2) + a*(-7*d^2 + (98*d*e*x^r)/(-7 + r) + (49
*e^2*x^(2*r))/(-7 + 2*r)) + 7*b*(-d^2 + (14*d*e*x^r)/(-7 + r) + (7*e^2*x^(2*r))/(-7 + 2*r))*Log[c*x^n])/(49*x^
7)

________________________________________________________________________________________

Maple [C]  time = 0.242, size = 1930, normalized size = 15.2 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d+e*x^r)^2*(a+b*ln(c*x^n))/x^8,x)

[Out]

-1/7*b*(-7*e^2*(x^r)^2*r+2*d^2*r^2-28*d*e*x^r*r+49*e^2*(x^r)^2-21*d^2*r+98*d*e*x^r+49*d^2)/x^7/(-7+2*r)/(-7+r)
*ln(x^n)-1/98*(8*b*d^2*n*r^4-168*b*d^2*n*r^3+33614*ln(c)*b*d^2+1274*b*d^2*n*r^2-4116*b*d^2*n*r-196*a*e^2*r^3*(
x^r)^2+3430*a*e^2*r^2*(x^r)^2+33614*a*d^2-98*I*Pi*b*e^2*r^3*csgn(I*c*x^n)^2*csgn(I*c)*(x^r)^2+392*I*Pi*b*d*e*r
^3*csgn(I*c*x^n)^3*x^r+33614*I*Pi*b*d*e*csgn(I*c*x^n)^2*csgn(I*c)*x^r+67228*a*d*e*x^r-16807*I*Pi*b*d^2*csgn(I*
c*x^n)^3-19208*a*e^2*r*(x^r)^2+8918*a*d^2*r^2-28812*a*d^2*r+56*a*d^2*r^4-1176*a*d^2*r^3+392*I*Pi*b*d*e*r^3*csg
n(I*x^n)*csgn(I*c*x^n)*csgn(I*c)*x^r+4802*b*d^2*n+9604*b*d*e*n*x^r-196*ln(c)*b*e^2*r^3*(x^r)^2+67228*ln(c)*b*d
*e*x^r+3430*ln(c)*b*e^2*r^2*(x^r)^2-19208*ln(c)*b*e^2*r*(x^r)^2+33614*ln(c)*b*e^2*(x^r)^2+4802*b*e^2*n*(x^r)^2
+8918*ln(c)*b*d^2*r^2-28812*ln(c)*b*d^2*r+33614*a*e^2*(x^r)^2+56*ln(c)*b*d^2*r^4-1176*ln(c)*b*d^2*r^3-9604*I*P
i*b*e^2*r*csgn(I*x^n)*csgn(I*c*x^n)^2*(x^r)^2-9604*I*Pi*b*e^2*r*csgn(I*c*x^n)^2*csgn(I*c)*(x^r)^2+24010*I*Pi*b
*d*e*r*csgn(I*c*x^n)^3*x^r-5488*I*Pi*b*d*e*r^2*csgn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I*c*x^n)^2+4459*I*Pi*b*d^2*r^2*csgn(I*c*x^n)^2*csgn(I*c)-1715*I*Pi*b*e^2*r^2*csgn
(I*x^n)*csgn(I*c*x^n)*csgn(I*c)*(x^r)^2-24010*I*Pi*b*d*e*r*csgn(I*x^n)*csgn(I*c*x^n)^2*x^r)/(-7+2*r)^2/x^7/(-7
+r)^2

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+e*x^r)^2*(a+b*log(c*x^n))/x^8,x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 1.44413, size = 1166, normalized size = 9.18 \begin{align*} -\frac{4 \,{\left (b d^{2} n + 7 \, a d^{2}\right )} r^{4} + 2401 \, b d^{2} n - 84 \,{\left (b d^{2} n + 7 \, a d^{2}\right )} r^{3} + 16807 \, a d^{2} + 637 \,{\left (b d^{2} n + 7 \, a d^{2}\right )} r^{2} - 2058 \,{\left (b d^{2} n + 7 \, a d^{2}\right )} r - 49 \,{\left (2 \, a e^{2} r^{3} - 49 \, b e^{2} n - 343 \, a e^{2} -{\left (b e^{2} n + 35 \, a e^{2}\right )} r^{2} + 14 \,{\left (b e^{2} n + 14 \, a e^{2}\right )} r +{\left (2 \, b e^{2} r^{3} - 35 \, b e^{2} r^{2} + 196 \, b e^{2} r - 343 \, b e^{2}\right )} \log \left (c\right ) +{\left (2 \, b e^{2} n r^{3} - 35 \, b e^{2} n r^{2} + 196 \, b e^{2} n r - 343 \, b e^{2} n\right )} \log \left (x\right )\right )} x^{2 \, r} - 98 \,{\left (4 \, a d e r^{3} - 49 \, b d e n - 343 \, a d e - 4 \,{\left (b d e n + 14 \, a d e\right )} r^{2} + 7 \,{\left (4 \, b d e n + 35 \, a d e\right )} r +{\left (4 \, b d e r^{3} - 56 \, b d e r^{2} + 245 \, b d e r - 343 \, b d e\right )} \log \left (c\right ) +{\left (4 \, b d e n r^{3} - 56 \, b d e n r^{2} + 245 \, b d e n r - 343 \, b d e n\right )} \log \left (x\right )\right )} x^{r} + 7 \,{\left (4 \, b d^{2} r^{4} - 84 \, b d^{2} r^{3} + 637 \, b d^{2} r^{2} - 2058 \, b d^{2} r + 2401 \, b d^{2}\right )} \log \left (c\right ) + 7 \,{\left (4 \, b d^{2} n r^{4} - 84 \, b d^{2} n r^{3} + 637 \, b d^{2} n r^{2} - 2058 \, b d^{2} n r + 2401 \, b d^{2} n\right )} \log \left (x\right )}{49 \,{\left (4 \, r^{4} - 84 \, r^{3} + 637 \, r^{2} - 2058 \, r + 2401\right )} x^{7}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+e*x^r)^2*(a+b*log(c*x^n))/x^8,x, algorithm="fricas")

[Out]

-1/49*(4*(b*d^2*n + 7*a*d^2)*r^4 + 2401*b*d^2*n - 84*(b*d^2*n + 7*a*d^2)*r^3 + 16807*a*d^2 + 637*(b*d^2*n + 7*
a*d^2)*r^2 - 2058*(b*d^2*n + 7*a*d^2)*r - 49*(2*a*e^2*r^3 - 49*b*e^2*n - 343*a*e^2 - (b*e^2*n + 35*a*e^2)*r^2
+ 14*(b*e^2*n + 14*a*e^2)*r + (2*b*e^2*r^3 - 35*b*e^2*r^2 + 196*b*e^2*r - 343*b*e^2)*log(c) + (2*b*e^2*n*r^3 -
 35*b*e^2*n*r^2 + 196*b*e^2*n*r - 343*b*e^2*n)*log(x))*x^(2*r) - 98*(4*a*d*e*r^3 - 49*b*d*e*n - 343*a*d*e - 4*
(b*d*e*n + 14*a*d*e)*r^2 + 7*(4*b*d*e*n + 35*a*d*e)*r + (4*b*d*e*r^3 - 56*b*d*e*r^2 + 245*b*d*e*r - 343*b*d*e)
*log(c) + (4*b*d*e*n*r^3 - 56*b*d*e*n*r^2 + 245*b*d*e*n*r - 343*b*d*e*n)*log(x))*x^r + 7*(4*b*d^2*r^4 - 84*b*d
^2*r^3 + 637*b*d^2*r^2 - 2058*b*d^2*r + 2401*b*d^2)*log(c) + 7*(4*b*d^2*n*r^4 - 84*b*d^2*n*r^3 + 637*b*d^2*n*r
^2 - 2058*b*d^2*n*r + 2401*b*d^2*n)*log(x))/((4*r^4 - 84*r^3 + 637*r^2 - 2058*r + 2401)*x^7)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+e*x**r)**2*(a+b*ln(c*x**n))/x**8,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (e x^{r} + d\right )}^{2}{\left (b \log \left (c x^{n}\right ) + a\right )}}{x^{8}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+e*x^r)^2*(a+b*log(c*x^n))/x^8,x, algorithm="giac")

[Out]

integrate((e*x^r + d)^2*(b*log(c*x^n) + a)/x^8, x)